<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>QM - 签到系统</title>
		<link rel="stylesheet" href="../css/style.default.css" type="text/css" />
		<script type="text/javascript" src="../js/plugins/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.cookie.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.uniform.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.validate.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.tagsinput.min.js"></script>
		<script type="text/javascript" src="../js/plugins/charCount.js"></script>
		<script type="text/javascript" src="../js/plugins/ui.spinner.min.js"></script>
		<script type="text/javascript" src="../js/plugins/chosen.jquery.min.js"></script>
		<script type="text/javascript" src="../js/custom/general.js"></script>
		<script type="text/javascript" src="../js/custom/forms.js"></script>

		<!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/style.ie9.css"/>
<![endif]-->
		<!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/style.ie8.css"/>
<![endif]-->
		<!--[if lt IE 9]>
	<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->

	
	<script type="text/javascript">
		function addLine(id, username, email, app_num, link_num){
			/*
			<tr>
				<td> 李四 </td>
				<td>789@qq.com</td>
				<td>8</td>
				<td>9</td>
				<td><a href="#" class="btn btn2 btn_archive"><span>操作</span></a></td>
			</tr>
			*/
		   //展示信息的行
			$tr = jQuery("<tr class=\"vartr\"></tr>");
			$tr.append(jQuery("<td>"+username+"</td>"));
			$tr.append(jQuery("<td>"+email+"</td>"));
			$tr.append(jQuery("<td>"+app_num+"</td>"));
			$tr.append(jQuery("<td>"+link_num+"</td>"));
			
			$opi = jQuery('<a href="#" class="btn btn2 btn_archive"><span>操作</span></a>');
			$opi.click(function(){
				eval("jQuery('#userid_'+id).show();");
			})
			$tr.append(jQuery("<td></td>").append($opi));
			
			//详细信息的行
			$frametr = jQuery("<tr class=\"vartr\"></tr>");
			//设置此行id,用于隐藏和显示
			$frametr.attr("id", "userid_"+id);
			$frametr.hide();
			$closeButton = jQuery("<button>关闭</buttton>");
			$closeButton.click(function(){
				eval("jQuery('#userid_'+id).hide();");
			})
			//加入关闭按钮
			$frametr.append(jQuery("<td></td>").append($closeButton));
			
			$iframe =jQuery("<iframe></iframe>");
			//加入iframe
			$frametr.append(jQuery("<td colspan='4'></td>").append($iframe));
			
			jQuery("#my_tbody").append($tr);
			jQuery("#my_tbody").append($frametr);
		}
		
		jQuery(function(){
			//////////////////////////////////////debug//////////////////////////////////
			return;
			//////////////////////////////////////debug//////////////////////////////////
			$vartr = jQuery(".vartr");
			for (var i = 0; i < $vartr.length; i++) {
				$vartr.remove();
			}
			
			jQuery.ajax({
				url:'../UserServlet',
				data:{
					'mode':44
				},
				success:function(message){
					console.log(message);
					alert(message);
					if(message[0] != '['){
						window.location.href="../index.jsp";
					}
					else{
						message = eval(message);
						
						jQuery("#id_user_num").text("共查询到 "+message.length+" 条记录");
						for(line in message){
							my_line = message[line];
							addLine(
									my_line['user_id'],
									my_line['user_name'],
									my_line['user_email'],
									my_line['app_num'],
									my_line['key_num']
							);
						}
					}
				},
				error:function(message){
					console.log(message)
				}
			})
		})
	</script>

	</head>

	<body class="withvernav">

		<div class="bodywrapper">
			<iframe style="background-color: #485b79;" src="top.jsp" width="100%" height="160px"></iframe>
			<!--header-->

			<div class="vernav2 iconmenu">
				<ul>
					<li><a href="#formsub" class="editor">帮助手册</a>
						<!-- <span class="arrow"></span>
						<ul id="formsub">
							<li class="current"><a href="forms.html">系统概览</a></li>
						</ul> -->
					</li>

				</ul>
				<a class="togglemenu"> </a>
				<br /><br />
			</div>
			<!--leftmenu-->

			<div class="centercontent">
				
				<div class="pageheader">
					<h1 class="pagetitle">欢迎使用 QM-签到系统</h1>
					<span class="pagedesc">Welcome to use QM Check-in System</span>

					<ul class="hornav">
						<li class="current"><a href="#preview_system">我的信息</a></li>
						<li><a href="#preview_dev">帮助手册</a></li>

					</ul>

				</div>
				
				<!--pageheader-->
				<div id="contentwrapper" class="contentwrapper">
					<!-- #################### 我的信息开始 ####################-->
					<div id="preview_system" class="subcontent">
						<button type="button" class="stdbtn btn_blue" id="show_my_message">查看我的信息</button>
						<script type="text/javascript">
							jQuery(function(){
								jQuery('#show_my_message').click(function(){
									jQuery("#content").attr('src', 'cimodify.jsp');
								})
							})
						</script>
						<iframe id="content" style="width: 100%; height: 1920px;" src="">   </iframe>
					</div>
					<!-- #################### 我的信息结束 ####################-->
					<!-- #################### 帮助手册 ####################-->
					<div id="preview_dev" class="subcontent" style="display: none" >

						<div class="contenttitle2">
							<h3>帮助手册</h3>
						</div>
					</div>
					<!-- #################### 帮助手册结束 ####################-->
				</div>
			</div>
			<!---->
		</div>
		<!--bodywrapper-->

	</body>
</html>
